package com.sky.cqculture.pojo;

import java.util.Date;
import java.util.List;

public class HeritageItem {
    private Integer id;                // 项目ID
    private String name;               // 项目名称
    private Integer categoryId;        // 分类ID
    private String imageUrl;           // 图片URL
    private String shortDescription;   // 简短描述
    private String detailContent;      // 详细内容(富文本)
    private Integer views;             // 浏览量
    private Date createTime;           // 创建时间
    private Date updateTime;           // 更新时间
    
    // 扩展字段，用于前端展示
    private String categoryName;       // 分类名称
    private Integer favoriteCount;     // 收藏数量
    private Boolean isFavorite;        // 当前用户是否收藏
    private List<Comment> comments;    // 评论列表

    public HeritageItem() {
    }

    public HeritageItem(Integer id, String name, Integer categoryId, String imageUrl, String shortDescription, 
                       String detailContent, Integer views, Date createTime, Date updateTime) {
        this.id = id;
        this.name = name;
        this.categoryId = categoryId;
        this.imageUrl = imageUrl;
        this.shortDescription = shortDescription;
        this.detailContent = detailContent;
        this.views = views;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public HeritageItem(Integer id, String name, Integer categoryId, String imageUrl, String shortDescription, String detailContent, Integer views, Date createTime, Date updateTime, String categoryName, Integer favoriteCount, Boolean isFavorite, List<Comment> comments) {

        this.id = id;
        this.name = name;
        this.categoryId = categoryId;
        this.imageUrl = imageUrl;
        this.shortDescription = shortDescription;
        this.detailContent = detailContent;
        this.views = views;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.categoryName = categoryName;
        this.favoriteCount = favoriteCount;
        this.isFavorite = isFavorite;
        this.comments = comments;
    }

    // getter和setter方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getShortDescription() {
        return shortDescription;
    }

    public void setShortDescription(String shortDescription) {
        this.shortDescription = shortDescription;
    }

    public String getDetailContent() {
        return detailContent;
    }

    public void setDetailContent(String detailContent) {
        this.detailContent = detailContent;
    }

    public Integer getViews() {
        return views;
    }

    public void setViews(Integer views) {
        this.views = views;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public Integer getFavoriteCount() {
        return favoriteCount;
    }

    public void setFavoriteCount(Integer favoriteCount) {
        this.favoriteCount = favoriteCount;
    }

    public Boolean getIsFavorite() {
        return isFavorite;
    }

    public void setIsFavorite(Boolean favorite) {
        isFavorite = favorite;
    }

    public List<Comment> getComments() {
        return comments;
    }

    public void setComments(List<Comment> comments) {
        this.comments = comments;
    }

    @Override
    public String toString() {
        return "HeritageItem{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", categoryId=" + categoryId +
                ", imageUrl='" + imageUrl + '\'' +
                ", views=" + views +
                ", createTime=" + createTime +
                '}';
    }
}